import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.util.*;
//饿汉式单例模式Person
class Person{
    private static Person person=new Person();
    private Person(){}
    public static Person getInstance(){
        return person;
    }
    public void saveFile1(String zhanghao) throws Exception {
        File file = new File("D:\\filedemo\\resigterInfo.txt");
        DataOutputStream dos = new DataOutputStream(new FileOutputStream(file));
        String Sname = JDBC1.getSname(zhanghao);
        dos.writeUTF(Sname);
        dos.flush();
        dos.close();
    }
}























